import { useRef } from "react";

function AddTodo({ onAddTodo }) {
  const inputRef = useRef<HTMLInputElement>(null);
  return (
    <div>
      <input type="text" ref={inputRef} />
      <button onClick={() => { onAddTodo(inputRef.current.value) }}>Add</button>
    </div>
  )
}

export default AddTodo